package mtris;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

public class GameThread extends Thread implements KeyListener
{
	private MPanel gamepanel; 
	public int xpos = 0;
	public GameThread(MPanel mpanel)
	{
		super();
		gamepanel = mpanel;
		start();
		
	}
	
	public void run()
	{
		gamepanel.repaint();
		
		xpos++;
		try{  
			Thread.sleep(500);
			
			}catch (InterruptedException ex)
			{
				ex.printStackTrace();
			}
			
	}
	@Override
	public void keyPressed(KeyEvent arg0) 
	{

		
	}

	@Override
	public void keyReleased(KeyEvent arg0) 
	{

		
	}

	@Override
	public void keyTyped(KeyEvent arg0) 
	{
		
		
	}
	
}
